﻿using System;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, Guid("00000119-0000-0000-C000-000000000046"), 
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IOleInPlaceSite : IOleWindow
    {
        [PreserveSig]
        new int GetWindow(out IntPtr phwnd);
        [PreserveSig]
        new int ContextSensitiveHelp([In] int fEnterMode);
        [PreserveSig]
        int CanInPlaceActivate();
        [PreserveSig]
        int OnInPlaceActivate();
        [PreserveSig]
        int OnUIActivate();
        [PreserveSig]
        int GetWindowContext([MarshalAs(UnmanagedType.Interface)] out IOleInPlaceFrame ppFrame, [MarshalAs(UnmanagedType.Interface)] out IOleInPlaceUIWindow ppDoc, [Out, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcPosRect, [Out, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcClipRect, [In, Out, MarshalAs(UnmanagedType.LPArray)] OLEINPLACEFRAMEINFO[] lpFrameInfo);
        [PreserveSig]
        int Scroll([In] SIZE scrollExtant);
        [PreserveSig]
        int OnUIDeactivate([In] int fUndoable);
        [PreserveSig]
        int OnInPlaceDeactivate();
        [PreserveSig]
        int DiscardUndoState();
        [PreserveSig]
        int DeactivateAndUndo();
        [PreserveSig]
        int OnPosRectChange([In, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcPosRect);
    }
}
